3.170 \(\int \sec ^2(e+f x) (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx\)

Optimal. Leaf size=17 \[ -\frac{a c \tan ^3(e+f x)}{3 f} \]

[Out]

-(a*c*Tan[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Rubi [A]  time = 0.0710234, antiderivative size = 17, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {3962, 2607, 30} \[ -\frac{a c \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Int[Sec[e + f*x]^2*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-(a*c*Tan[e + f*x]^3)/(3*f)

Rule 3962

Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_.)*(csc[(e_.) + (f_.)*(x_)
]*(d_.) + (c_))^(n_.), x_Symbol] :> Dist[(-(a*c))^m, Int[ExpandTrig[(g*csc[e + f*x])^p*cot[e + f*x]^(2*m), (c
+ d*csc[e + f*x])^(n - m), x], x], x] /; FreeQ[{a, b, c, d, e, f, g, n, p}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2
 - b^2, 0] && IntegersQ[m, n] && GeQ[n - m, 0] && GtQ[m*n, 0]

Rule 2607

Int[sec[(e_.) + (f_.)*(x_)]^(m_)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[1/f, Subst[Int[(b*x)
^n*(1 + x^2)^(m/2 - 1), x], x, Tan[e + f*x]], x] /; FreeQ[{b, e, f, n}, x] && IntegerQ[m/2] &&  !(IntegerQ[(n
- 1)/2] && LtQ[0, n, m - 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \sec ^2(e+f x) (a+a \sec (e+f x)) (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int \sec ^2(e+f x) \tan ^2(e+f x) \, dx\right )\\ &=-\frac{(a c) \operatorname{Subst}\left (\int x^2 \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac{a c \tan ^3(e+f x)}{3 f}\\ \end{align*}

Mathematica [A]  time = 0.0186051, size = 17, normalized size = 1. \[ -\frac{a c \tan ^3(e+f x)}{3 f} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[e + f*x]^2*(a + a*Sec[e + f*x])*(c - c*Sec[e + f*x]),x]

[Out]

-(a*c*Tan[e + f*x]^3)/(3*f)

________________________________________________________________________________________

Maple [B]  time = 0.02, size = 36, normalized size = 2.1 \begin{align*}{\frac{1}{f} \left ( ac\tan \left ( fx+e \right ) +ac \left ( -{\frac{2}{3}}-{\frac{ \left ( \sec \left ( fx+e \right ) \right ) ^{2}}{3}} \right ) \tan \left ( fx+e \right ) \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

1/f*(a*c*tan(f*x+e)+a*c*(-2/3-1/3*sec(f*x+e)^2)*tan(f*x+e))

________________________________________________________________________________________

Maxima [B]  time = 0.97744, size = 49, normalized size = 2.88 \begin{align*} -\frac{{\left (\tan \left (f x + e\right )^{3} + 3 \, \tan \left (f x + e\right )\right )} a c - 3 \, a c \tan \left (f x + e\right )}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="maxima")

[Out]

-1/3*((tan(f*x + e)^3 + 3*tan(f*x + e))*a*c - 3*a*c*tan(f*x + e))/f

________________________________________________________________________________________

Fricas [B]  time = 0.438633, size = 86, normalized size = 5.06 \begin{align*} \frac{{\left (a c \cos \left (f x + e\right )^{2} - a c\right )} \sin \left (f x + e\right )}{3 \, f \cos \left (f x + e\right )^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="fricas")

[Out]

1/3*(a*c*cos(f*x + e)^2 - a*c)*sin(f*x + e)/(f*cos(f*x + e)^3)

________________________________________________________________________________________

Sympy [A]  time = 6.85426, size = 53, normalized size = 3.12 \begin{align*} \begin{cases} - \frac{a c \left (\frac{\tan ^{3}{\left (e + f x \right )}}{3} + \tan{\left (e + f x \right )}\right ) - a c \tan{\left (e + f x \right )}}{f} & \text{for}\: f \neq 0 \\x \left (a \sec{\left (e \right )} + a\right ) \left (- c \sec{\left (e \right )} + c\right ) \sec ^{2}{\left (e \right )} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)**2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x)

[Out]

Piecewise((-(a*c*(tan(e + f*x)**3/3 + tan(e + f*x)) - a*c*tan(e + f*x))/f, Ne(f, 0)), (x*(a*sec(e) + a)*(-c*se
c(e) + c)*sec(e)**2, True))

________________________________________________________________________________________

Giac [A]  time = 1.26771, size = 22, normalized size = 1.29 \begin{align*} -\frac{a c \tan \left (f x + e\right )^{3}}{3 \, f} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(f*x+e)^2*(a+a*sec(f*x+e))*(c-c*sec(f*x+e)),x, algorithm="giac")

[Out]

-1/3*a*c*tan(f*x + e)^3/f